71e4ee
@@ -109,7 +109,7 @@
InputStream decode(final InputStream in, final Coder coder,
             byte propsByte = coder.properties[0];
             long dictSize = coder.properties[1];
             for (int i = 1; i < 4; i++) {
-                dictSize |= (coder.properties[i + 1] << (8 * i));
+                dictSize |= (coder.properties[i + 1] & 0xffl) << (8 * i);
             }
             if (dictSize > LZMAInputStream.DICT_SIZE_MAX) {
                 throw new IOException("Dictionary larger than 4GiB maximum size");
